home *** CD-ROM | disk | FTP | other *** search
- package com.sun.java.swing.plaf.basic;
-
- import com.sun.java.swing.AbstractAction;
- import java.awt.event.ActionEvent;
- import java.io.Serializable;
-
- class BasicTableUI$ArrowKeyAction extends AbstractAction implements Serializable {
- // $FF: synthetic field
- BasicTableUI this$0;
- // $FF: renamed from: dx int
- protected transient int field_0;
- // $FF: renamed from: dy int
- protected transient int field_1;
-
- // $FF: synthetic method
- public BasicTableUI$ArrowKeyAction(BasicTableUI this$0, int dx, int dy) {
- this.this$0 = this$0;
- this.field_0 = dx;
- this.field_1 = dy;
- }
-
- public boolean inRange(int index, int max) {
- return index >= 0 && index < max;
- }
-
- public void actionPerformed(ActionEvent e) {
- int anchorColumn = this.this$0.table.getSelectedColumn() + this.field_0;
- if (this.inRange(anchorColumn, this.this$0.table.getColumnCount())) {
- int anchorRow = this.this$0.table.getSelectedRow() + this.field_1;
- if (this.inRange(anchorRow, this.this$0.table.getRowCount())) {
- if (this.field_0 != 0) {
- BasicTableUI.access$clearSelection(this.this$0, this.this$0.table.getColumnModel().getSelectionModel());
- }
-
- if (this.field_1 != 0) {
- BasicTableUI.access$clearSelection(this.this$0, this.this$0.table.getSelectionModel());
- }
-
- BasicTableUI.access$moveAnchor(this.this$0, anchorRow, anchorColumn);
- }
- }
- }
- }
-